package com.lvt.example.thinking.in.spring.questions.L22.web.example04.validate;

/**
 * desc：class
 *
 * @author LT
 * @date 2022/10/24
 */

import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;

@Data
public class Student {


    @NotEmpty
    @Size(max = 10)
    private String name;

    private short age;

    @Valid
    private Phone phone;

    @Data
    class Phone {
        @Size(max = 10)
        private String number;
    }
}